package com.example.springmybatis.mapper;

import com.example.springmybatis.entity.Admin;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface Adminmapper {
    @Select("select * from admin where username=#{username}")
    Admin selectUsername(String username);
    @Select("INSERT INTO admin (username,password) VALUES (#{username},#{password})")
    Admin register(String username,String password);

    @Select("update admin set photo=#{file} Where user_id=#{id}")
    String upimg(String file,String id);
}
